<%@ page language="java" contentType= "text/html" pageEncoding="UTF-8"%>
<%@include file="/include/common/loadinguihead1.jsp"%>
<%@include file="/include/common/loadinguihead2.jsp"%>
<%
	page1.getPageTitle().setTitle("%%{pageTitle}%%");
	page1.setPageNameDisplay(true);
%>
<jm:form>
<jm:layout postion="north">
	<jm:toolbar exportDisabled="true" printDisabled="true"/>
	<jm:pageTitle/>
</jm:layout>

<jm:layout postion="center">
	<jm:error></jm:error>
	<jm:dp id="dp1" data="<%=Utils.TAG_FORM%>" tabSize="1" keydownConfig="code:'enter',action:'loading',tabid:'grid1'" >
		<jm:tab colModel="220px;*">
			<jm:radio name="firstel" codeList="prosSn|工序號;hrnum|工人工號;bill_no|工票號;" colspan="2" skip="true"/>
			<jm:group captionDisplay="false">
				<jm:org caption="生產部門" name="org"  required="true" />
				<input caption="工票號" name="bill_no" type="text" required="true" />
				<input caption="工人工號" name="hrnum" type="text" required="true" />
				<input caption="工序號" name="prosSn" type="text" required="true" />
				<input caption="計件數" name="qty" type="text" required="true" loading="true" />
			</jm:group>
			
			<jm:group caption="备注(实际使用的时候可以删除此块)">
				<jm:field captionWidth="20px" keep="true">
					<span style="color: blue">
						1.loading 的验证主要都放在后台 <br>
						2.验证ok的数字要重新返回到前台,如:计件数 输入001 ,后台要返回1并更新相应的表格栏位.<br>
						3.支持取消与修改功能<br>
						4.表格支持上下左右移动编辑<br>
					</span>
					<%if(true){%>
						<jm:button name="ck1" value="插入一笔资料" style="width:100px" onclick="$('#grid1').intRecord([{hrnum:'005053',bill_no:'00100',status:'随便点111'+$P.gv($('#grid1').data['index'],0)}]);return false;"/>
						<jm:button name="ck2" value="插入一笔资料(清空带合并功能)" style="width:200px" onclick="try{$('#grid1').intRecord([{hrnum:'005053',bill_no:'00101',status:'随便点22'},{hrnum:'005053',bill_no:'00100',status:'随便点333'}],{reset:true,merge:'auto'});}catch(e){console.log(e);} return false;"/>
					<%} %>
				</jm:field>
			</jm:group>
			
		</jm:tab>
	</jm:dp>
	<br>
	<jm:table id="grid1" width="800px" jump="true">
		<jm:thead >
			<tr style="">
				<td config="cid:'hrnum',editor:'text',merge:true" width="100px">工人工號</td>
				<td config="cid:'prosSn'" width="100px">工序號</td>
				<td config="cid:'bill_no',editor:'text',eedit:'eedit_bill_no'" width="100px">工票號</td>
				<td config="cid:'qty',editor:'text',bedit:'bedit_qty'" width="200px">計件數</td>
				<td config="cid:'status'" width="*">狀態</td>
				<td config="cid:'toolbar'" width="130px">&nbsp;</td>
			</tr>
		</jm:thead>
		<jm:tbody></jm:tbody>
	</jm:table>
</jm:layout>

<jm:layout postion="south" />
</jm:form>
<jm:script><script type="text/javascript" charset="UTF-8">
	function bedit_qty(p){
		try{
			//console.log(this);
			//console.log(p);
		}catch(e){}
		return true;
	}
	
	function eedit_bill_no(p){
		try{
			//console.log(this);
			//console.log(p);
		}catch(e){}
		return true;
	}
	
	function bloading(p){
		//p['ret'] = 0;
		//p['status'] = 'wwwwwww';
		return p;
	}
</script></jm:script>
<%@include file="/include/common/loadinguiend.jsp"%>